{template common/header}
<div class="admin_header">
	<div class="logo">
		<img src="{imagedir}consolelogo.png" />
	</div>
	<div class="login_info">
		<strong>$cuser['nickname'] </strong> <span>[administrator]</span>
		<a href="{url welcome/index}" target="_blank">{lang admin_frontpage:admin}</a> 
		<a href="{url admin/logout}">{lang admin_logout:admin}</a>
	</div>
	<div id="adnav" class="admin-nav">
		<ul>
			<li class="active"><a href="#" data-id="dashboard">{lang admin_dashboard:admin}</a></li>
			<li><a href="#" data-id="basic">{lang admin_basic:admin}</a></li>
			<li><a href="#" data-id="layout">{lang admin_layout:admin}</a></li>
			<li><a href="#" data-id="content">{lang admin_content:admin}</a></li>
			<li><a href="#" data-id="user">{lang admin_user:admin}</a></li>
			<li><a href="#" data-id="operation">{lang admin_operation:admin}</a></li>
			<li><a href="#" data-id="dz">{lang admin_dz:admin}</a></li>
			{loop $modules $module}
			{if $module['console']}
			<li><a href="#" data-id="{$module['name']}">{echo lang('title',$module['name'])}</a></li>
			{/if}
			{/loop}
			<li><a href="#" data-id="misc">{lang admin_misc:admin}</a></li>
		</ul>
	</div>
</div>
<div class="admin_content">
	<div id="menu" class="admin_left">
		<ul id="dashboard">
			<li class="active"><a href="#" url="{url admin/dashboard_center}"><i class="arrow_icon"></i>{lang admin_dashboard_center:admin}</a></li>
		</ul>
		<ul id="basic" class="hide">
			<li><a href="#" url="{url admin/basicinfo}"><i class="arrow_icon"></i>{lang admin_basic_info:admin}</a></li>
			<li><a href="#" url="{url admin/basicpzglobal}"><i class="arrow_icon"></i>{lang admin_basic_pzglobal:admin}</a></li>
			<li><a href="#" url="{url admin/basicmessage}"><i class="arrow_icon"></i>{lang admin_basic_message:admin}</a></li>
			<li><a href="#" url="{url admin/basicaccess}"><i class="arrow_icon"></i>{lang admin_basic_access:admin}</a></li>
			<li><a href="#" url="{url admin/basicoptimizer}"><i class="arrow_icon"></i>{lang admin_basic_optimizer:admin}</a></li>
			<li><a href="#" url="{url admin/basicseo}"><i class="arrow_icon"></i>{lang admin_basic_seo:admin}</a></li>
			<li class="hide"><a href="#" url="{url admin/basictime}"><i class="arrow_icon"></i>{lang admin_basic_time:admin}</a></li>
			<li><a href="#" url="{url admin/basicupload}"><i class="arrow_icon"></i>{lang admin_basic_upload:admin}</a></li>
			<li><a href="#" url="{url admin/basicsecode}"><i class="arrow_icon"></i>{lang admin_basic_secode:admin}</a></li>
			<li><a href="#" url="{url admin/basicshare}"><i class="arrow_icon"></i>{lang admin_basic_share:admin}</a></li>
			<li><a href="#" url="{url admin/basicemail}"><i class="arrow_icon"></i>{lang admin_basic_email:admin}</a></li>
			<li><a href="#" url="{url admin/basicother}"><i class="arrow_icon"></i>{lang admin_basic_other:admin}</a></li>
		</ul>
		<ul id="layout" class="hide">
			<li><a href="#" url="{url admin/layoutui?type=default}"><i class="arrow_icon"></i>{lang admin_layout_ui:admin}</a></li>
			<li><a href="#" url="{url admin/layoutstyle}"><i class="arrow_icon"></i>{lang admin_layout_style:admin}</a></li>
			<li><a href="#" url="{url admin/layoutsmiles}"><i class="arrow_icon"></i>{lang admin_layout_smiles:admin}</a></li>
			<li><a href="#" url="{url admin/layoutcolor}"><i class="arrow_icon"></i>{lang admin_layout_color:admin}</a></li> 
			<li><a href="#" url="{url admin/layoutusertheme}"><i class="arrow_icon"></i>{lang admin_layout_usertheme:admin}</a></li> 
		</ul>
		<ul id="content" class="hide">
			<li><a href="#" url="{url admin/contentcategory}"><i class="arrow_icon"></i>{lang admin_content_category:admin}</a></li>
			<li><a href="#" url="{url admin/contenttag}"><i class="arrow_icon"></i>{lang admin_content_tag:admin}</a></li>
			<li><a href="#" url="{url admin/contentshare}"><i class="arrow_icon"></i>{lang admin_content_items:admin}</a></li>
			<li class="hide"><a href="#" url="{url admin/contentcomments}"><i class="arrow_icon"></i>{lang admin_content_comments:admin}</a></li>
			<li><a href="#" url="{url admin/contentcensor}"><i class="arrow_icon"></i>{lang admin_content_censor:admin}</a></li>
			<li><a href="#" url="{url admin/contenttopic}"><i class="arrow_icon"></i>{lang admin_content_topic:admin}</a></li>
			<li><a href="#" url="{url admin/contentgroup}"><i class="arrow_icon"></i>{lang admin_content_group:admin}</a></li>
		</ul>
		<ul id="user" class="hide">
			<li><a href="#" url="{url admin/userlist}"><i class="arrow_icon"></i>{lang admin_user_list:admin}</a></li>
			<li><a href="#" url="{url admin/usergroup?type=member}"><i class="arrow_icon"></i>{lang admin_user_group:admin}</a></li>
			<li><a href="#" url="{url admin/credit?type=setting}"><i class="arrow_icon"></i>{lang credit_setting:admin}</a></li>
			<li><a href="#" url="{url admin/starusers}"><i class="arrow_icon"></i>{lang admin_user_star:admin}</a></li>
			<li><a href="#" url="{url admin/starcategory}"><i class="arrow_icon"></i>{lang admin_user_starcategory:admin}</a></li>
			<li><a href="#" url="{url admin/stores}"><i class="arrow_icon"></i>{lang admin_user_store:admin}</a></li>
			<li><a href="#" url="{url admin/storecategory}"><i class="arrow_icon"></i>{lang admin_user_storecategory:admin}</a></li>
			<li><a href="#" url="{url admin/apply?type=1}"><i class="arrow_icon"></i>{lang admin_user_apply:admin}</a></li>
		</ul>
		<ul id="operation" class="hide">
			<li><a href="#" url="{url admin/socialapi}"><i class="arrow_icon"></i>{lang admin_operation_api:admin}</a></li>
			<li><a href="#" url="{url admin/homeslide}"><i class="arrow_icon"></i>{lang admin_operation_slide:admin}</a></li>
			<li><a href="#" url="{url admin/adsmanage}"><i class="arrow_icon"></i>{lang admin_operation_ad:admin}</a></li>
			<li class="hide"><a href="#" url="{url admin/userlist}"><i class="arrow_icon"></i>{lang admin_operation_medal:admin}</a></li>
			<li><a href="#" url="{url admin/taobaorule}"><i class="arrow_icon"></i>{lang admin_operation_taobao:admin}</a></li>
			<li><a href="#" url="{url admin/sharebutton}"><i class="arrow_icon"></i>{lang admin_operation_sharebutton:admin}</a></li>
			<li><a href="#" url="{url admin/friendlink}"><i class="arrow_icon"></i>{lang friendlink:admin}</a></li>
		</ul>
		<ul id="dz" class="hide">
			<li><a href="#" url="{url admin/dzucenter}"><i class="arrow_icon"></i>{lang admin_dz_ucenter:admin}</a></li>
			<li><a href="#" url="{url admin/dzforum}"><i class="arrow_icon"></i>{lang admin_dz_forum:admin}</a></li>
		</ul> 
		<ul id="misc" class="hide">
			<li><a href="#" url="{url admin/misccache}"><i class="arrow_icon"></i>{lang admin_misc_cache:admin}</a></li>
			<li><a href="#" url="{url admin/modulemanage}"><i class="arrow_icon"></i>{lang admin_misc_module:admin}</a></li>
			<li><a href="#" url="{url admin/sysupdate}"><i class="arrow_icon"></i>{lang admin_misc_sysupdate:admin}</a></li>
			<li><a href="#" url="{url admin/dbmanagement}"><i class="arrow_icon"></i>{lang admin_misc_database:admin}</a></li>
			<li><a href="#" url="{url admin/recreate}"><i class="arrow_icon"></i>{lang admin_recreate:admin}</a></li>
		</ul>
		
		{loop $modules $module}
		{if $module['console']}
		<ul id="{$module['name']}" class="hide">
			{loop $module['console'] $console} 
			<li><a href="#" url="{$console['url']}"><i class="arrow_icon"></i>{$console['label']}</a></li>
			{/loop}
		</ul> 
		{/if}
		{/loop}
		
		<div class="copyright-footer">
			<p>Powered by <a href="http://www.pintuxiu.com/" target="_blank"><img src="{imagedir}copylogo.png"/></a> V4.0</p>
			<p>&copy; 2010-2013, <a href="http://www.onightjar.com/" target="_blank">ONightJar.com.</a></p>
		</div>
	</div>
	<div id="rightMain" class="admin_right">
		<iframe id="rightMainFrame" src="{url admin/dashboard_center}"
				width="100%" frameborder="false" scrolling="auto"
				style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; margin-bottom: 30px;"
				allowtransparency="true"></iframe>
	</div>
</div>
<script type="text/javascript">
if(!Array.prototype.map)
Array.prototype.map = function(fn,scope) {
  var result = [],ri = 0;
  for (var i = 0,n = this.length; i < n; i++){
	if(i in this){
	  result[ri++]  = fn.call(scope ,this[i],i,this);
	}
  }
return result;
};

var getWindowSize = function(){
return ["Height","Width"].map(function(name){
  return window["inner"+name] ||
	document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
});
}
window.onload = function (){
	if(!+"\v1" && !document.querySelector) { // for IE6 IE7
	  document.body.onresize = resize;
	} else { 
	  window.onresize = resize;
	}
	function resize() {
		wSize();
		return false;
	}
}

function wSize(){
	var str=getWindowSize();
	var strs= new Array();
	strs=str.toString().split(",");
	var height = strs[0]-83,Body = $('body');
	var width = strs[1]-198;
	$('#rightMain').height(height);   
	$('#menu').height(height);   
	$('#rightMain').width(width);
	$('#rightMainFrame').width(width);
	$('#rightMainFrame').height(height);
}
wSize();

$("#menu").find("li").find("a").click(function(){
	var abc=$(this).attr("url");
	$("#rightMainFrame").attr("src",abc)
	$("#menu").find("li").removeClass("active");
	$(this).parent().addClass("active");
});

$("#adnav").find("li").find("a").click(function(){
	var mid=$(this).attr("data-id");
	$("#menu").find("ul").addClass("hide");
	$("#"+mid).removeClass("hide");
	$("#"+mid).find("li:first").find("a").click();
	$("#"+mid).find("li:first").addClass("active");
	$("#adnav").find("li").removeClass("active");
	$(this).parent().addClass("active");
});
</script>
{template common/footer}